"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = require("express");
const noteController_1 = require("../controllers/noteController");
const auth_1 = require("../middleware/auth");
const router = (0, express_1.Router)();
// 所有笔记路由都需要认证
router.use(auth_1.authMiddleware);
// 笔记CRUD操作
router.get('/', noteController_1.getNotes);
router.get('/search', noteController_1.searchNotes);
router.get('/tags', noteController_1.getTags);
router.get('/:id', noteController_1.getNoteById);
router.post('/', noteController_1.createNote);
router.put('/:id', noteController_1.updateNote);
router.delete('/:id', noteController_1.deleteNote);
exports.default = router;
